package com.woohua.demo.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;

/**
 * @author wooHua
 * @date 2022/7/6 9:37
 * @description
 */
@Slf4j
@Service
public class CouponService {

    @EventListener// <1>
    public void addCoupon(UserRegisterEvent event) {
        log.info("[addCoupon][给用户({}) 发放优惠劵]", event.getUsername());
    }
}
